@font-face {
  font-weight: normal;
  font-style: normal;
  font-family: "Icons";
  src: url("/resources/fonts/icons.woff");
}

* {
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
}

:host {
  display: inline-flex;
  cursor: pointer;
  --sidebar-width: 310px;
}

/* reset inherited properties from outside the shadow dom */
:host > * {
  all: initial;
  color: var(--text-color, #555555);
  font-family: inherit;
}

#mainAccessButton {
  flex: 1;
  padding: 5px 5px 5px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: inherit;
  text-align: inherit;
}

#mainAccessButton:empty::before {
  content: "\200b";
}

#secondaryAccessButton {
  padding: 0 10px;
  border-left: 1px solid var(--border-color);
  font-size: 9px;
  font-family: Icons;
  cursor: inherit;
}

#secondaryAccessButton.has-settings {
  font-size: 14px;
}

#secondaryAccessButton:hover {
  color: var(--highlighted-color);
}

#secondaryAccessButton::before {
  content: "c";
}

#secondaryAccessButton.has-settings::before {
  content: "g";
}

a {
  color: var(--highlighted-color);
  text-decoration: underline dotted;
  cursor: pointer;
}

a:hover,
a:focus {
  text-decoration: underline solid;
}

a[target="_blank"]::after {
  content: "E";
  display:inline-block;
  text-decoration: none;
  font-family: Icons;
  margin-left: 0.25em;
  font-size: 0.75em;
}

.warning-text {
  color: var(--warning-color);
  opacity: 1 !important;
  font-weight: bold;
}

*::-moz-focus-inner {
  border: 0;
}

/* overlay */

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: .3;
  background: var(--base-invert-color, #000000);
  transition: opacity .3s;
  z-index: 10;
}

#overlay.o-show {
  opacity: .3;
}

#overlay.o-hide {
  opacity: .0;
}

/* command bar */

#commandBar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  width: var(--sidebar-width);
  height: 100%;
  background: var(--base-color, #FFFFFF);
  box-shadow: 0 0 8px 2px var(--shadowSecond-color, #999999);
}

#commandBarWrapper {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.cb-panel {
  display: flex;
  height: 100%;
  flex-direction: column;
}

/* transition classes */

#commandBar.cb-show {
  transition: transform .3s;
  transform: translate(0, 0);
}

#commandBar.cb-hide {
  transition: transform .3s;
  transform: translate(100%, 0);
}

.cb-panel.cb-init-slide {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  transition: transform .2s;
}

.cb-panel.cb-slide-right {
  transform: translate(100%, 0);
}

.cb-panel.cb-slide-left {
  transform: translate(-100%, 0);
}

/* container head */

.cb-head {
  display: flex;
  flex-direction: row;
  padding: 20px 20px 15px 20px;
  border-bottom: 1px solid var(--borderSecond-color, #EAEAEA);
  background: var(--baseSecond-color, #FBFBFB);
}

/* add flexible space to the right to center the heading untill it grows too big */
.cb-head::after {
  max-width: 40px;
  flex: 1 1 0;
  content: "";
}
/* add hard space to the left to prevent the text growing behind the back button and center heading */
.cb-heading {
  margin: 0 auto;
  padding-left: 40px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
  font-size: 18px;
}

#commandsPanel.search-visible .cb-heading {
  opacity: 0;
  visibility: hidden;
}

#commandsSearchInput {
  visibility: hidden;
  opacity: 0;
  width: 60%;
  padding: 5px;
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  margin: 0 auto;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--borderSecond-color, #EAEAEA);
  background-color: var(--baseSecond-color, #FBFBFB);
  border-radius: 0;
  transition: visibility 0s linear 0.2s, opacity 0.2s;
}

#commandsSearchInput::placeholder {
  text-align: center;
}

#commandsPanel.search-visible #commandsSearchInput {
  opacity: 1;
  visibility: visible;
  transition: visibility 0s linear 0s, opacity 0.2s;
}

#commandsSearchButton {
  position: absolute;
  top: 12px;
  left: 10px;
  padding: 8px 10px;
  background: none;
  font-size: 16px;
  font-family: Icons;
  color: var(--text-color, #555555);
  border: solid 1px transparent;
  border-radius: 2px;
  -moz-appearance: none;
}

#commandsSearchButton:hover {
  border-color: var(--border-color, #DDDDDD);
}

#commandsSearchButton::before {
  content: "m";
}

#commandsPanel.search-visible #commandsSearchButton {
  color: var(--highlighted-color, #00AAA0);
}

#settingsBackButton {
  position: absolute;
  top: 12px;
  left: 10px;
  padding: 8px 10px;
  border: solid 1px transparent;
  border-radius: 2px;
  background: none;
  font-size: 16px;
  font-family: Icons;
  color: var(--text-color, #555555);
}

#settingsBackButton:hover {
  border-color: var(--border-color, #DDDDDD);
}

#settingsBackButton::before {
  content: "L";
}

#commandBarCancelButton {
  position: absolute;
  top: 50%;
  left: 0;
  padding: 1.2em 0.3em 1.2em 0.8em;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  color: var(--text-color, #555555);
  box-shadow: -4px 0 4px 0 var(--shadowSecond-color, #999999);
  font-size: 12px;
  font-family: Icons;
  cursor: pointer;
  transform: translate(-100%, -50%);
  border-right: 1px solid var(--borderSecond-color, #EAEAEA);
  background: var(--baseSecond-color, #FBFBFB);
  transition: opacity .3s;
}

.cb-hide #commandBarCancelButton {
  opacity: 0;
}

#commandBarCancelButton::before {
  content: "R";
}

/* container main */

.cb-main {
  width: var(--sidebar-width);
  overflow-y: hidden;
  flex: 1;
  overscroll-behavior: none;
}

.cb-main:hover {
  overflow-x: hidden;
  overflow-y: auto;
}

/* hide scrollbar on sliding animation */

.cb-init-slide .cb-main {
  overflow-y: hidden;
}

.cb-scroll-container {
  display: flex;
  flex-direction: column;

  width: inherit;
  min-height: 100%;
}

#commandsPanel.search-runs .cb-scroll-container {
  padding: 20px 0;
  box-sizing: border-box;
}

/* command list */

.cb-command-group {
  padding: 20px 0;
  list-style: none;
}

.cb-command-group:not(:last-child) {
  border-bottom: 1px solid var(--borderSecond-color, #EAEAEA);
}

#commandsPanel.search-runs .cb-command-group {
  display: contents;
}

.cb-command-item {
  position: relative;
  padding: 10px 30px;
  cursor: default;
}

.cb-command-item.cb-active::before {
  position: absolute;
  top: 9px;
  left: 11px;
  content: "\2022";
}

.cb-command-item:hover {
  background: var(--base-brighter-color, #FAFAFC);
}

.cb-command-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.cb-command-name {
  flex-grow: 1;
  color: var(--text-color, #555555);
}

.cb-command-settings-icon {
  margin-left: 10px;
  color: var(--border-color, #DDDDDD);
  font-family: Icons;
  cursor: default;
}

.cb-command-settings-icon::before {
  content: "g";
  vertical-align: middle;
}

.cb-command-info {
  display: flex;
  flex-direction: row;
  height: 0;
  overflow: hidden;
  white-space: pre-line;
  transition: .3s;
}

.cb-command-description {
  margin-top: 0.5em;
  flex-grow: 1;
  font-size: 14px;
}

.cb-command-permissions-icon {
  margin-top: 0.5em;
  margin-left: 10px;
  align-self: flex-start;
  color: var(--border-color, #DDDDDD);
  font-family: Icons;
  cursor: default;
}

.cb-command-permissions-icon::before {
  content: "p";
}

/* command setting */

#settingsForm {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cb-setting {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 30px 30px 10px 30px;
  cursor: default;
}

.cb-setting:last-of-type {
  margin-bottom: 30px;
}

.cb-setting-name {
  flex-basis: 0;
  flex-grow: 1;
  font-size: 16px;
}

.cb-setting-description {
  opacity: .5;
  flex-basis: 100%;
  font-size: 14px;
  transition: opacity .3s;
}

.cb-setting:hover .cb-setting-description {
  opacity: 1;
}

/* container footer */

#settingsSaveButton {
  margin: auto 30px 20px 30px;
  padding: 8px 6px 6px 6px;
  border: 1px solid var(--highlighted-color, #00AAA0);
  border-radius: 3px;
  background: var(--highlighted-color, #00AAA0);
  color: var(--textSecond-color);
  text-align: center;
  cursor: pointer;
  transition: box-shadow .3s;
  font-weight: normal;
}

#settingsSaveButton:hover {
  box-shadow: 0 0 10px -4px var(--shadowSecond-color, rgba(0,0,0,0.15));
}

/* special input stylings */

.cb-setting .cb-setting-description + * {
  margin-top: 10px;
}

.cb-setting .toggle-button + .cb-setting-description {
  margin-top: 10px;
}

/* toggle button layout */

.toggle-button {
  appearance: none;
  display: inline-block;
  width: 47px;
  padding: 8px 0 6px 0;
  margin-left: 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 2px;
  background: var(--base-color, #FFF);
  color: var(--text-color, #555555);
  text-align: center;
  font-size: 1rem;
  font-family: inherit;
  transition: background .5s;
}

.toggle-button::after {
  content: "__MSG_toggleButtonOff__";
}

.toggle-button:checked::after {
  content: "__MSG_toggleButtonOn__";
}

.toggle-button:checked {
  border-color: var(--highlighted-color, #00AAA0);
  background: var(--highlighted-color, #00AAA0);
  color: var(--textSecond-color, #FFF);
}

/* input field layout */

.input-field {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 2px;
  background: var(--base-color, #FFF);
  box-shadow: none;
  color: var(--text-color, #555555);
  text-align: center;
  text-overflow: ellipsis ellipsis;
  -moz-appearance: textfield;
}

/* select field layout */

.select-wrapper {
  width: 100%;
  position: relative;
}

.select-wrapper::after {
  position: absolute;
  top: 50%;
  right: 9px;
  color: var(--text-color, #555555);
  content: "D";
  font-size: 11px;
  font-family: Icons;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-field {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 25px 4px 5px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 2px;
  background-color: var(--base-color, #FFF);
  color: var(--text-color, #555555);
  text-align: center;
  text-overflow: ellipsis;
  -moz-appearance: none;
       appearance: none;
}

/* text field layout */

.text-field {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 2px;
  background: var(--base-color, #FFF);
  box-shadow: none;
  color: var(--text-color, #555555);
  font-family: "NunitoSans Regular", "Arial", sans-serif;
  resize: vertical;
}

/* custom multi select field layout */

.multi-select-field {
  width: 100%;
  background: var(--base-color, #FFF);
  color: var(--text-color, #555555);
  font-family: "NunitoSans Regular", "Arial", sans-serif;
}

.multi-select-field > * {
  padding: 0.5em 0.5em;
}